package com.salud.mendoza;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * Created by ricardo on 09/06/14.
 */
public class PropertiesManager {
    private static Properties properties;

    private static void load() {
        try {
            properties = new Properties();
            properties.load(new FileInputStream("personal.properties"));
        } catch (IOException e) {
            Logger.getAnonymousLogger().log(Level.SEVERE, e.getMessage());
        }
    }

    public static String getProperty(String value) {
        if (properties == null) load();
        return (String) properties.get(value);
    }

    public static void reLoad() {
        load();
    }
}
